<?php

use think\migration\Migrator;
use app\model\BaseSupplier;

class AlterBaseSupplierJingDong extends Migrator
{
    public function up()
    {
        BaseSupplier::findOrCreate([
            'code'       => 'JingDongUnion',
            'serv_type'  => PRODUCT_MOBILE_CPS_SERV,
            'api_config' => '{"apiKey":"d103d1f008c048db1831e879f6b72a31","secretKey":"61eaf6228ced44e4a60be36140cea2f9","bestUrl":"https://api.jd.com/routerjson"}',
            'name'       => '京东联盟',
        ]);
    }

    public function down()
    {
        BaseSupplier::destroy(['code' => 'JingDongUnion']);
    }
}
